
#include <apvp.pb.h>
#include "PlatformProperty.h"

TRANSMIT_READ_PROPERTY(PA_Power_Res,proto::ipcp::PwrctrlVptoapimpl) {
    builder.area(VehicleArea::GLOBAL)
        .initValue([](){
                return proto::ipcp::PwrctrlVptoapimpl{};
        })

        .immutableStatus(PropertyStatus::Active)

        .withValueBySignals([]([[maybe_unused]] proto::ipcp::PwrctrlVptoapimpl lastValue){

            auto pa=SIGNAL.getPA_Power_Res();
            proto::ipcp::PwrctrlVptoapimpl protoObj;
            protoObj.set_csdstatus(pa.csdStatus);
            protoObj.set_csdplaywelcome(pa.csdPlayWelcome);
            protoObj.set_csdkeepontouch(pa.csdKeepOnTouch);
            protoObj.set_csdpwm(pa.csdPwm);
            protoObj.set_psdpwm(pa.psdPwm);
            protoObj.set_voltagelevel(pa.voltageLevel);
            protoObj.set_im(pa.im);
            protoObj.set_iplm(pa.iplm);
            protoObj.set_reserve(pa.reserve);       
            return protoObj;

        },ecarx::transfer::PASignal::PA_Power_Res);
}
